From: Basil L. Contovounesios Date: Sat, 21 Aug 2021 21:55:58 +0000 (+0100) Subject: Fix recent parse-partial-sexp argument validation X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~18^2~1602 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=ff2124d2979ee9ba5b8e22147fa8ccaa00e2cc4f;p=emacs.git Fix recent parse-partial-sexp argument validation * src/syntax.c (parse-partial-sexp): Also handle markers as arguments (bug#49944). Tweak error message to follow conventions in "(elisp) Signaling Errors". --- diff --git a/src/syntax.c b/src/syntax.c index adc0da730ea..057a4c3b1f5 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -3595,8 +3595,8 @@ Sixth arg COMMENTSTOP non-nil means stop after the start of a comment. else target = TYPE_MINIMUM (EMACS_INT); /* We won't reach this depth. */ - if (XFIXNUM (to) < XFIXNUM (from)) - error ("End position should be larger than start position."); + if (fix_position (to) < fix_position (from)) + error ("End position is smaller than start position"); validate_region (&from, &to); internalize_parse_state (oldstate, &state);